package com.wondersgroup.mapper;

import com.wondersgroup.entity.Person;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PersonMapper {


  /**
   * 根据openId  以及有效标志  获取人员信息
   */

  Person getPersonByOpenId(@Param("openId") String openId,@Param("yxbz") String yxbz);

  /**
   * 获取所有有效的注册人员
   * @return
   */
  List<Person> getAllPersons(String yxbz);

  /**
   * 注册
   * @param person
   */
  void addPerson(Person person) throws Exception;

  void updatePerson(Person person);
}
